package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

import lombok.Data;

/**
 * @desc TopBatchHisDto
 * @使用场景
 */
@Data
public class TopBatchHisDto extends BaseDto implements Serializable {

  /**
   * 批次ID
   */
  @ApiModelProperty("批次ID")
  private String batchCode;

  /**
   * 批次编号
   */
  @ApiModelProperty("批次编号")
  private String batchNumber;

  /**
   * 批次名称
   */
  @ApiModelProperty("批次名称")
  private String batchName;

  /**
   * 批次开始时间
   */
  @ApiModelProperty("批次开始时间")
  private Date batchStartTime;

  /**
   * 批次结束时间
   */
  @ApiModelProperty("批次结束时间")
  private Date batchEndTime;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @ApiModelProperty("主体生命周期")
  private String subjectLifeCycle;

  /**
   * 操作人就职记录ID
   */
  @ApiModelProperty("操作人就职记录ID")
  private String operationInductionId;

  /**
   * 操作时间
   */
  @ApiModelProperty("操作时间")
  private Date operateTime;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    TopBatchHisDto that = (TopBatchHisDto) o;
    return (
      batchCode == that.batchCode &&
      batchNumber == that.batchNumber &&
      batchName == that.batchName &&
      batchStartTime == that.batchStartTime &&
      batchEndTime == that.batchEndTime &&
      subjectLifeCycle == that.subjectLifeCycle &&
      operationInductionId == that.operationInductionId &&
      operateTime == that.operateTime
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      batchCode,
      batchNumber,
      batchName,
      batchStartTime,
      batchEndTime,
      subjectLifeCycle,
      operationInductionId,
      operateTime
    );
  }

}
